#include "iostream"
#include "stdio.h"
#include <string.h>
#include <fstream>
#include <array>

using namespace std;

typedef struct books
{
    /* data */
    int title[50];
    char author[50];
    char subject[100];
    int book_price;
}Books;

class Log
{
private:
    int priva;
protected:
    int protect = 0;
public:
    double element;
    long element1;
    std::array<int, 5> myarray = {1, 2, 3, 4, 5};
    enum example : unsigned char
    {
        a = 5, b, c
    };
    example num = a;    //ֻ����exampleö�������ֵ
public:
    void print(const char* para)
    {
        cout << *para << endl;
    }
};

class Entity : public Log
{   
public:
    std::string name = "This is class Entity";
    Entity()
    {
        // cout << "OVER" << endl;
    }
    void printName()
    {
        cout << name << endl;
    }
    
};

int main()
{
    // char data[100] = "What's up!";
    // ofstream f;
    // f.open("file.txt");
    // string line;
    // //f << data <<endl;
    // f.close();
    Log log;
<<<<<<< HEAD
    cout << "结束了" << endl;
    // for(int value : log.myarray)
    // {
    //     cout << value << "\t";
    // }



    Entity entity;
    // Log log;
    // cout << sizeof(entity.element1) << endl;
    // entity.print((char *)entity.a);
    // log.log("hello");
    // cout << sizeof(entity.element1) << endl;
    // entity.print((char *)entity.a);
    //log.log("hello");
    // printf("%x\n",sizeof(log.num));
=======
    cout << sizeof(entity.element1) << endl;
    entity.print((char *)entity.a);
    log.log("hello");
     printf("%x\n",sizeof(log.num));
>>>>>>> origin/branch1
    // printf("%d\n",log.b);
    // printf("%d\n",log.c);
    // Books mybook;
    //memset(mybook.title, 0x00, sizeof(mybook.title));
    // for(int i=0; i<50; i++)
    // {
    //     mybook.title[i] = 2;
    //     //printf("%d", mybook.title[i]);
    //     cout << mybook.title[i] << endl;
    // }
    //mybook.title[1] = 1;
    
    //Entity entity2;
    // entity.printName();
    // entity.name = "Hello, World";
    // entity2.printName();
	// int nSetSamplingTime{};  
	// printf("SetSamplingTime:");
	// cin >> hex >> nSetSamplingTime;
	// cout << "0x " << hex << nSetSamplingTime * 2 << endl;
	// cout << "nSetSamplingTime * 2" << endl;

    return 0;
}

